package com.miyuan.net;


import com.miyuan.bean.ResultBean;
import com.miyuan.bean.respone.CategoryListBean;
import com.miyuan.bean.respone.GoodsListBean;
import com.miyuan.bean.respone.MachineDetailsBean;
import com.miyuan.bean.respone.MachineGoodsBean;
import com.miyuan.bean.respone.MachineListBean;
import com.miyuan.bean.respone.TokenBean;
import com.miyuan.bean.respone.UserBean;
import com.miyuan.bean.respone.UserReplenishmentBean;
import com.miyuan.bean.respone.VendorInfoBean;

import java.util.List;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * Created by admin on 2018/4/17.
 */

public interface NetService {

    //发送短信验证码
    @POST("/oauth/sms")
    Call<ResultBean> getSMSCode(@Body RequestBody body);

    //登录
    @POST("oauth/app/token")
    Call<ResultBean<TokenBean>> login(@Body RequestBody body);

    //售货机列表
    @POST("app/vender/page")
    Call<ResultBean<MachineListBean>> getMachineList(@Body RequestBody body);

    //售货机商品分类
    @POST("app/vender/goods/classification")
    Call<ResultBean<List<CategoryListBean>>> getGoodsCategory(@Body RequestBody body);

    //售货机商品列表
    @POST("app/vender/{vendorId}/goods")
    Call<ResultBean<MachineGoodsBean>> getMachineGoods(@Path("vendorId") String vendorId, @Body RequestBody body);

    //售货机详情
    @GET("app/vender/{vendorId}/info")
    Call<ResultBean<MachineDetailsBean>> getMachineDetials(@Path("vendorId") String vendorId);

    //售货机修改
    @POST("app/vender/{vendorId}/update")
    Call<ResultBean> updateMachineDetials(@Path("vendorId") String vendorId, @Body RequestBody body);


    //补货清单
    @POST("app/replenishmentlist/getReplenishmentList")
    Call<ResultBean<List<GoodsListBean>>> getReplenishmentList();

    //完成补货------
    @POST("app/replenishment/addReplenishment")
    Call<ResultBean> addReplenishment(@Body RequestBody body);

    //我的信息
    @POST("app/myself/myinformation")
    Call<ResultBean<UserBean>> getUserInfo();

    //我的补货记录
    @POST("/app/myself/getReplenishmentList")
    Call<ResultBean<UserReplenishmentBean>> getUserReplenishmentList(@Body RequestBody body);

    //工控号查询补货机信息----
    @POST("app/replenishment/{controlNumber}/getVendorInfo")
    Call<ResultBean<VendorInfoBean>> getVendorInfo(@Path("controlNumber") String controlNumber);
}
